<template>
  <div class="app-container">
    <h3>设备维保临期提醒</h3>
    <el-table v-loading="loading" :data="postList" :model="queryParams" border style="font-size: 15px;">
      <el-table-column label="序号" align="center" prop="deviceId" width="60" />
      <el-table-column label="设备名称" align="center" prop="deviceName" />
      <el-table-column label="设备类型" align="center" prop="deviceModel" />
      <el-table-column label="所属车间" align="center" prop="deviceWorkshop" />
      <el-table-column label="设备负责人" align="center" prop="deviceManager" />
      <el-table-column label="上次维保时间" align="center" prop="deviceLasttime" />
      <el-table-column label="维保到期剩余" align="center" prop="deviceDeadline" />
      <el-table-column label="维保位置" align="center" prop="deviceCheckpoint" />
    </el-table>
  </div>

</template>

<script>
  import {
    mainwarn
  } from "@/api/system/warn";

  export default {
    data() {
      return {
        loading: true,
        postList: [],
        queryParams: {
          deviceId: null,
          deviceName: null,
          deviceModel: null,
          deviceWorkshop: null,
          deviceManager: null,
          deviceLasttime: null,
          deviceDeadline: null,
          deviceCheckpoint: null
        },
        // 表单参数
        queryParams: {}
      }
    },
    created() {
      this.getList();
    },
    methods: {
      /** 查询岗位列表 */
      getList() {
        this.loading = true;
        mainwarn().then(response => {
          this.postList = response.data;
          this.loading = false;
        });
      },
    }
  }
</script>

<style>
  h3{
    text-align: center;
    font-size: 35px;
    color: #0072C6;
  }
</style>
